package user;

import book.BookList;
import ioperations.IOperation;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: zhongyisheng
 * Date: 2024-07-05
 * Time: 17:00
 */
public abstract class User {
    protected String name;
    //数组没有初始化
    protected IOperation[] iOperations;

    // 子类初始化父类的成员
    public User(String name) {
        this.name = name;
    }

    public abstract int menu();

    public void doIoperation(int choice, BookList bookList) {
        iOperations[choice].work(bookList);
    }

}
